package tx.audioAndVideoRecorder;

import java.util.ArrayList;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.TextView;

public class audioAdapter extends ArrayAdapter<audio>{
	
	private static Context mContext= null;
	// Play button on each row
	private Button btnPlay = null;
	
	private static final String FILE_SRING_DISPLAY = "";
	
	private static ArrayList<audio> itemsAudio;
	private LayoutInflater inflater;
	
	public audioAdapter(Context context, int textViewResourceId, ArrayList<audio> items) {
        super(context, textViewResourceId, items);
        this.itemsAudio = items;
        mContext = context;
        inflater = LayoutInflater.from(mContext);
	}
	
	 @Override
     public View getView(int position, View convertView, ViewGroup parent) {
             View row =inflater.inflate(R.layout.audio_listview_layout, parent, false);
    		 TextView label=(TextView)row.findViewById(R.id.lblListRow);
    		 label.setText(itemsAudio.get(position).getAudioFileName());             
             
    		 return row;
             
	 }
}
